<?php
    session_start();
    include('../include/util.inc.php');
    $PDO = getPDO();
    
    // $datetime = $_GET['datetime'];
    // $uid = $_SESSION['uid'];
    // $hid = str_pad($uid, 4, '0', STR_PAD_LEFT) . $datetime;
    // $hid = $PDO->quote($hid);
    // $hid = str_replace('?', '', $chid);
    try{
        $sql = "SELECT id, ategory, level, question, answer, property FROM question";
        $result = $PDO->query($sql);
        $result = $result->fetchAll();
        echo json_encode($result);
    }catch (PDOException $e) {
        echo $e->getMessage();
    }



?>